﻿using System;

namespace _105_Csharp语法中的ValueTuple_元组
{
    class Program
    {
        static void Main(string[] args)
        {
            (string,string,byte) zoomla = ("cms", "发哥", 26);
            Console.WriteLine("三元组：\nItem1={0}\nItem2={1}\nItme3={2}\n",zoomla.Item1,zoomla.Item2,zoomla.Item3);

            //再声明二元组，初始化时直接用两个DateTime实例填充，编译时会自动推断出该二元组的元素类型均为DateTime

            var fage = (new DateTime(2007, 1, 1), new DateTime(2018, 1, 1));
            Console.WriteLine("二元组：\nItme1={0:d}\nItme2={1:d}", fage.Item1, fage.Item2);

        }
    }
}
